<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue.js"></script>
</head>

<body>
    <div>
        <div>
            <span>
                <span>{{message}}</span>
                <span>{{fun1()}}</span>
                <span>{{arr}}</span>

            </span>
        </div>
    </div>
</body>
<script>
    let vm = new Vue({
        el: 'span',
        data: {
            message: '烧杯',
            arr:['1','2','3']
        },
        methods: {
            fun1: function () {
                alert('哈哈哈')
            }
        }
    })
    console.log('修改前:' + vm.$data.message);
    vm.$watch('message',function(){
        console.log('你修改了信息o,这是修改后:' + vm.$data.message);
    })
    vm.message = '哈哈哈你是烧杯'
</script>

</html>